<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 特性问题:
        1.兄弟关系,两个盒子处置外边距与水平外边距
             - 垂直方向 外边距取最大值
             - 水平方向 外边距会进行合并处理
        2.父子关系,给子加外边距,但作用于父身上,怎么解决 */
        .box1,.box2,.box3,.box4{
            width: 200px;
            height: 200px;
        }
        .box1{
            background: red;
            margin-bottom: 100px;
        }
        .box2{
            background: yellow;
            margin-top: 50px;
        }
        .box3{
            float: left;
            background: blue;
            margin-right: 100px;
        }
        .box4{
            float: left;
            background:green;
            margin-left: 50px;
        }

    </style>
</head>
<body>
    <div class="box1"></div>
    <div class="box2"></div>

    <div class="box3"></div>
    <div class="box4"></div>

</body>
</html>